<%-- 
    Document   : paymentform
    Created on : 2 juin 2012, 02:49:08
    Author     : isen
--%>

<%@page import="persistence.PersistenceImplementation"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>


<% String clientname = (String) request.getSession().getAttribute("user");
int cartid = PersistenceImplementation.getJDBCPersistenceManager().getCurrentCartId(clientname);
double finalprice = PersistenceImplementation.getJDBCPersistenceManager().getFinalPrice(cartid);
%>
 
        <% if(!PersistenceImplementation.getJDBCPersistenceManager().cartIsEmpty(cartid)) {%>
<h1>The amount of your purchases is: <%= finalprice%> </h1>


        <p>To confirm the payment of your purchases, click on "payment"</p>

        <form name="form" action="../view/paymentConfirmation.jsp">
            <input type="submit" value="pagar" name="payment" />
        </form>
        
        <%}else{%>
        <p> Your shoppingCart is empty</p>
       <%@include file="/WEB-INF/include/menuClient.jsp" %>
 
     <% }%>





    </body>
</html>
